package com.quotemanager.businessbean;

import com.quotemanager.dao.ProductTypeDao;
import com.quotemanager.dataobject.ProductType;
import com.quotemanager.exception.DataAccessException;

public class ProductTypeBean {
	
	private static final ProductTypeDao productTypeDao = new ProductTypeDao();
	
	public int registerProduct(ProductType productType) throws DataAccessException{
		int id = productTypeDao.registerProductType(productType);
		return id;
	}
	
	public ProductType[] getAllProductTypes() throws DataAccessException {
		return productTypeDao.getAllProductTypes();
	}
	
	public ProductType getProductTypeById(int productTypeId) throws DataAccessException {
		return productTypeDao.getProductTypeById(productTypeId);
	}

	public void updateProductType(ProductType productType) throws DataAccessException {
		productTypeDao.updateProductType(productType);
	}
}
